'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  const { tryError } = middleware;
  const { front: frontController } = controller;

  router.post('/api/login', tryError, frontController.login);
  router.post('/api/userinfo', tryError, frontController.get_userinfo);
  router.get('/api/project/info', tryError, frontController.project_info);
  router.post('/api/get_phone', tryError, frontController.get_phone);
  router.post('/api/reserve', tryError, frontController.reserve);
  router.post('/api/writeOff', tryError, frontController.writeOff);
};
